Package-level declarations

Types

Link copied to clipboard
class AutoCorrectionPolicy(maxRetries: Int = DEFAULT_MAX_RETRIES, minFuzzyLength: Int = DEFAULT_MIN_FUZZY_LENGTH) : ToolNotFoundPolicy

Feeds the error back to the LLM with a fuzzy-match suggestion, allowing it to self-correct. Matches tool names using case-insensitive containment (either direction). Throws ToolNotFoundException after maxRetries consecutive failures.

Link copied to clipboard

Chains multiple injection strategies into a pipeline.

Link copied to clipboard

Throws ToolNotFoundException immediately on first unknown tool call.

Link copied to clipboard
data class LlmMessageResponse(val message: Message, val textContent: String, val usage: Usage? = null)

Framework-agnostic result of a single LLM inference call. Represents the assistant's response which may include tool calls.

Link copied to clipboard
fun interface LlmMessageSender

Framework-agnostic interface for making a single LLM inference call.

Link copied to clipboard

Thrown when the tool loop exceeds the maximum number of iterations.

Link copied to clipboard

Thrown when a required tool group is unavailable or missing expected tools at resolution time. This is distinct from ToolNotFoundException, which is thrown during tool loop execution when the LLM requests an unavailable tool.

Link copied to clipboard
data class ToolCallResult(val toolName: String, val toolInput: String, val result: String, val resultObject: Any?)

Result of a tool call execution.

Link copied to clipboard
data class ToolInjectionContext(val conversationHistory: List<Message>, val currentTools: List<Tool>, val lastToolCall: ToolCallResult, val iterationCount: Int)

Context provided to injection strategies for decision-making.

Link copied to clipboard
data class ToolInjectionResult(val toolsToAdd: List<Tool> = emptyList(), val toolsToRemove: List<Tool> = emptyList())

Result of tool injection evaluation.

Link copied to clipboard

Strategy for dynamically injecting tools during a conversation.

Link copied to clipboard
interface ToolLoop

Embabel's own tool execution loop.

Link copied to clipboard
interface ToolLoopFactory

Factory for creating ToolLoop instances.

Link copied to clipboard
data class ToolLoopResult<O>(val result: O, val conversationHistory: List<Message>, val totalIterations: Int, val injectedTools: List<Tool>, val removedTools: List<Tool> = emptyList(), val totalUsage: Usage? = null, val replanRequested: Boolean = false, val replanReason: String? = null, val blackboardUpdater: BlackboardUpdater = BlackboardUpdater {})

Result of executing an Embabel tool loop.

Link copied to clipboard
sealed class ToolNotFoundAction

Action returned by ToolNotFoundPolicy.handle.

Link copied to clipboard
class ToolNotFoundException(val requestedTool: String, val availableTools: List<String>) : RuntimeException

Thrown when the LLM requests a tool that is not available.

Link copied to clipboard

Determines how the tool loop responds when the LLM calls a tool that does not exist in the available set.

Link copied to clipboard

Injection strategy that handles UnfoldingTool invocations.